\(\int x^2 \cosh ^2(a+b x-c x^2) \, dx\) [20]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 18, antiderivative size = 268 \[ \int x^2 \cosh ^2\left (a+b x-c x^2\right ) \, dx=\frac {x^3}{6}-\frac {b^2 e^{2 a+\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{5/2}}-\frac {e^{2 a+\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{3/2}}-\frac {b^2 e^{-2 a-\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erfi}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{5/2}}+\frac {e^{-2 a-\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erfi}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{3/2}}-\frac {b \sinh \left (2 a+2 b x-2 c x^2\right )}{16 c^2}-\frac {x \sinh \left (2 a+2 b x-2 c x^2\right )}{8 c} \]

[Out]

1/6*x^3-1/16*b*sinh(-2*c*x^2+2*b*x+2*a)/c^2-1/8*x*sinh(-2*c*x^2+2*b*x+2*a)/c-1/64*b^2*exp(2*a+1/2*b^2/c)*erf(1
/2*(-2*c*x+b)*2^(1/2)/c^(1/2))*2^(1/2)*Pi^(1/2)/c^(5/2)-1/64*exp(2*a+1/2*b^2/c)*erf(1/2*(-2*c*x+b)*2^(1/2)/c^(
1/2))*2^(1/2)*Pi^(1/2)/c^(3/2)-1/64*b^2*exp(-2*a-1/2*b^2/c)*erfi(1/2*(-2*c*x+b)*2^(1/2)/c^(1/2))*2^(1/2)*Pi^(1
/2)/c^(5/2)+1/64*exp(-2*a-1/2*b^2/c)*erfi(1/2*(-2*c*x+b)*2^(1/2)/c^(1/2))*2^(1/2)*Pi^(1/2)/c^(3/2)

Rubi [A] (verified)

Time = 0.17 (sec) , antiderivative size = 268, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {5503, 5495, 5491, 5483, 2266, 2236, 2235, 5482} \[ \int x^2 \cosh ^2\left (a+b x-c x^2\right ) \, dx=-\frac {\sqrt {\frac {\pi }{2}} e^{2 a+\frac {b^2}{2 c}} \text {erf}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{3/2}}-\frac {\sqrt {\frac {\pi }{2}} b^2 e^{2 a+\frac {b^2}{2 c}} \text {erf}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{5/2}}+\frac {\sqrt {\frac {\pi }{2}} e^{-2 a-\frac {b^2}{2 c}} \text {erfi}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{3/2}}-\frac {\sqrt {\frac {\pi }{2}} b^2 e^{-2 a-\frac {b^2}{2 c}} \text {erfi}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{5/2}}-\frac {b \sinh \left (2 a+2 b x-2 c x^2\right )}{16 c^2}-\frac {x \sinh \left (2 a+2 b x-2 c x^2\right )}{8 c}+\frac {x^3}{6} \]

[In]

Int[x^2*Cosh[a + b*x - c*x^2]^2,x]

[Out]

x^3/6 - (b^2*E^(2*a + b^2/(2*c))*Sqrt[Pi/2]*Erf[(b - 2*c*x)/(Sqrt[2]*Sqrt[c])])/(32*c^(5/2)) - (E^(2*a + b^2/(
2*c))*Sqrt[Pi/2]*Erf[(b - 2*c*x)/(Sqrt[2]*Sqrt[c])])/(32*c^(3/2)) - (b^2*E^(-2*a - b^2/(2*c))*Sqrt[Pi/2]*Erfi[
(b - 2*c*x)/(Sqrt[2]*Sqrt[c])])/(32*c^(5/2)) + (E^(-2*a - b^2/(2*c))*Sqrt[Pi/2]*Erfi[(b - 2*c*x)/(Sqrt[2]*Sqrt
[c])])/(32*c^(3/2)) - (b*Sinh[2*a + 2*b*x - 2*c*x^2])/(16*c^2) - (x*Sinh[2*a + 2*b*x - 2*c*x^2])/(8*c)

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2236

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erf[(c + d*x)*Rt[(-b)*Log[F],
 2]]/(2*d*Rt[(-b)*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 2266

Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[F^(a - b^2/(4*c)), Int[F^((b + 2*c*x)^2/(4*c))
, x], x] /; FreeQ[{F, a, b, c}, x]

Rule 5482

Int[Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[1/2, Int[E^(a + b*x + c*x^2), x], x] - Dist[1/2
, Int[E^(-a - b*x - c*x^2), x], x] /; FreeQ[{a, b, c}, x]

Rule 5483

Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[1/2, Int[E^(a + b*x + c*x^2), x], x] + Dist[1/2
, Int[E^(-a - b*x - c*x^2), x], x] /; FreeQ[{a, b, c}, x]

Rule 5491

Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]*((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[e*(Sinh[a + b*x + c*x^2]/(
2*c)), x] - Dist[(b*e - 2*c*d)/(2*c), Int[Cosh[a + b*x + c*x^2], x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b*
e - 2*c*d, 0]

Rule 5495

Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]*((d_.) + (e_.)*(x_))^(m_), x_Symbol] :> Simp[e*(d + e*x)^(m - 1)*(
Sinh[a + b*x + c*x^2]/(2*c)), x] + (-Dist[(b*e - 2*c*d)/(2*c), Int[(d + e*x)^(m - 1)*Cosh[a + b*x + c*x^2], x]
, x] - Dist[e^2*((m - 1)/(2*c)), Int[(d + e*x)^(m - 2)*Sinh[a + b*x + c*x^2], x], x]) /; FreeQ[{a, b, c, d, e}
, x] && GtQ[m, 1] && NeQ[b*e - 2*c*d, 0]

Rule 5503

Int[Cosh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]^(n_)*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandTrigReduce
[(d + e*x)^m, Cosh[a + b*x + c*x^2]^n, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && IGtQ[n, 1]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {x^2}{2}+\frac {1}{2} x^2 \cosh \left (2 a+2 b x-2 c x^2\right )\right ) \, dx \\ & = \frac {x^3}{6}+\frac {1}{2} \int x^2 \cosh \left (2 a+2 b x-2 c x^2\right ) \, dx \\ & = \frac {x^3}{6}-\frac {x \sinh \left (2 a+2 b x-2 c x^2\right )}{8 c}+\frac {\int \sinh \left (2 a+2 b x-2 c x^2\right ) \, dx}{8 c}+\frac {b \int x \cosh \left (2 a+2 b x-2 c x^2\right ) \, dx}{4 c} \\ & = \frac {x^3}{6}-\frac {b \sinh \left (2 a+2 b x-2 c x^2\right )}{16 c^2}-\frac {x \sinh \left (2 a+2 b x-2 c x^2\right )}{8 c}+\frac {b^2 \int \cosh \left (2 a+2 b x-2 c x^2\right ) \, dx}{8 c^2}+\frac {\int e^{2 a+2 b x-2 c x^2} \, dx}{16 c}-\frac {\int e^{-2 a-2 b x+2 c x^2} \, dx}{16 c} \\ & = \frac {x^3}{6}-\frac {b \sinh \left (2 a+2 b x-2 c x^2\right )}{16 c^2}-\frac {x \sinh \left (2 a+2 b x-2 c x^2\right )}{8 c}+\frac {b^2 \int e^{2 a+2 b x-2 c x^2} \, dx}{16 c^2}+\frac {b^2 \int e^{-2 a-2 b x+2 c x^2} \, dx}{16 c^2}-\frac {e^{-2 a-\frac {b^2}{2 c}} \int e^{\frac {(-2 b+4 c x)^2}{8 c}} \, dx}{16 c}+\frac {e^{2 a+\frac {b^2}{2 c}} \int e^{-\frac {(2 b-4 c x)^2}{8 c}} \, dx}{16 c} \\ & = \frac {x^3}{6}-\frac {e^{2 a+\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{3/2}}+\frac {e^{-2 a-\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erfi}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{3/2}}-\frac {b \sinh \left (2 a+2 b x-2 c x^2\right )}{16 c^2}-\frac {x \sinh \left (2 a+2 b x-2 c x^2\right )}{8 c}+\frac {\left (b^2 e^{-2 a-\frac {b^2}{2 c}}\right ) \int e^{\frac {(-2 b+4 c x)^2}{8 c}} \, dx}{16 c^2}+\frac {\left (b^2 e^{2 a+\frac {b^2}{2 c}}\right ) \int e^{-\frac {(2 b-4 c x)^2}{8 c}} \, dx}{16 c^2} \\ & = \frac {x^3}{6}-\frac {b^2 e^{2 a+\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{5/2}}-\frac {e^{2 a+\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erf}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{3/2}}-\frac {b^2 e^{-2 a-\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erfi}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{5/2}}+\frac {e^{-2 a-\frac {b^2}{2 c}} \sqrt {\frac {\pi }{2}} \text {erfi}\left (\frac {b-2 c x}{\sqrt {2} \sqrt {c}}\right )}{32 c^{3/2}}-\frac {b \sinh \left (2 a+2 b x-2 c x^2\right )}{16 c^2}-\frac {x \sinh \left (2 a+2 b x-2 c x^2\right )}{8 c} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.51 (sec) , antiderivative size = 181, normalized size of antiderivative = 0.68 \[ \int x^2 \cosh ^2\left (a+b x-c x^2\right ) \, dx=\frac {3 \left (b^2-c\right ) \sqrt {2 \pi } \text {erfi}\left (\frac {-b+2 c x}{\sqrt {2} \sqrt {c}}\right ) \left (\cosh \left (2 a+\frac {b^2}{2 c}\right )-\sinh \left (2 a+\frac {b^2}{2 c}\right )\right )+3 \left (b^2+c\right ) \sqrt {2 \pi } \text {erf}\left (\frac {-b+2 c x}{\sqrt {2} \sqrt {c}}\right ) \left (\cosh \left (2 a+\frac {b^2}{2 c}\right )+\sinh \left (2 a+\frac {b^2}{2 c}\right )\right )+4 \sqrt {c} \left (8 c^2 x^3-3 (b+2 c x) \sinh (2 (a+x (b-c x)))\right )}{192 c^{5/2}} \]

[In]

Integrate[x^2*Cosh[a + b*x - c*x^2]^2,x]

[Out]

(3*(b^2 - c)*Sqrt[2*Pi]*Erfi[(-b + 2*c*x)/(Sqrt[2]*Sqrt[c])]*(Cosh[2*a + b^2/(2*c)] - Sinh[2*a + b^2/(2*c)]) +
 3*(b^2 + c)*Sqrt[2*Pi]*Erf[(-b + 2*c*x)/(Sqrt[2]*Sqrt[c])]*(Cosh[2*a + b^2/(2*c)] + Sinh[2*a + b^2/(2*c)]) +
4*Sqrt[c]*(8*c^2*x^3 - 3*(b + 2*c*x)*Sinh[2*(a + x*(b - c*x))]))/(192*c^(5/2))

Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 273, normalized size of antiderivative = 1.02

method result size
risch \(\frac {x^{3}}{6}+\frac {x \,{\mathrm e}^{2 c \,x^{2}-2 b x -2 a}}{16 c}+\frac {b \,{\mathrm e}^{2 c \,x^{2}-2 b x -2 a}}{32 c^{2}}+\frac {b^{2} \sqrt {\pi }\, {\mathrm e}^{-\frac {4 a c +b^{2}}{2 c}} \operatorname {erf}\left (\sqrt {-2 c}\, x +\frac {b}{\sqrt {-2 c}}\right )}{32 c^{2} \sqrt {-2 c}}-\frac {\sqrt {\pi }\, {\mathrm e}^{-\frac {4 a c +b^{2}}{2 c}} \operatorname {erf}\left (\sqrt {-2 c}\, x +\frac {b}{\sqrt {-2 c}}\right )}{32 c \sqrt {-2 c}}-\frac {x \,{\mathrm e}^{-2 c \,x^{2}+2 b x +2 a}}{16 c}-\frac {b \,{\mathrm e}^{-2 c \,x^{2}+2 b x +2 a}}{32 c^{2}}-\frac {b^{2} \sqrt {\pi }\, {\mathrm e}^{\frac {4 a c +b^{2}}{2 c}} \sqrt {2}\, \operatorname {erf}\left (-\sqrt {2}\, \sqrt {c}\, x +\frac {b \sqrt {2}}{2 \sqrt {c}}\right )}{64 c^{\frac {5}{2}}}-\frac {\sqrt {\pi }\, {\mathrm e}^{\frac {4 a c +b^{2}}{2 c}} \sqrt {2}\, \operatorname {erf}\left (-\sqrt {2}\, \sqrt {c}\, x +\frac {b \sqrt {2}}{2 \sqrt {c}}\right )}{64 c^{\frac {3}{2}}}\) \(273\)

[In]

int(x^2*cosh(-c*x^2+b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

1/6*x^3+1/16/c*x*exp(2*c*x^2-2*b*x-2*a)+1/32*b/c^2*exp(2*c*x^2-2*b*x-2*a)+1/32*b^2/c^2*Pi^(1/2)*exp(-1/2*(4*a*
c+b^2)/c)/(-2*c)^(1/2)*erf((-2*c)^(1/2)*x+b/(-2*c)^(1/2))-1/32/c*Pi^(1/2)*exp(-1/2*(4*a*c+b^2)/c)/(-2*c)^(1/2)
*erf((-2*c)^(1/2)*x+b/(-2*c)^(1/2))-1/16/c*x*exp(-2*c*x^2+2*b*x+2*a)-1/32*b/c^2*exp(-2*c*x^2+2*b*x+2*a)-1/64*b
^2/c^(5/2)*Pi^(1/2)*exp(1/2*(4*a*c+b^2)/c)*2^(1/2)*erf(-2^(1/2)*c^(1/2)*x+1/2*b*2^(1/2)/c^(1/2))-1/64/c^(3/2)*
Pi^(1/2)*exp(1/2*(4*a*c+b^2)/c)*2^(1/2)*erf(-2^(1/2)*c^(1/2)*x+1/2*b*2^(1/2)/c^(1/2))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 843 vs. \(2 (218) = 436\).

Time = 0.27 (sec) , antiderivative size = 843, normalized size of antiderivative = 3.15 \[ \int x^2 \cosh ^2\left (a+b x-c x^2\right ) \, dx=\frac {32 \, c^{3} x^{3} \cosh \left (c x^{2} - b x - a\right )^{2} + 6 \, {\left (2 \, c^{2} x + b c\right )} \cosh \left (c x^{2} - b x - a\right )^{4} + 24 \, {\left (2 \, c^{2} x + b c\right )} \cosh \left (c x^{2} - b x - a\right ) \sinh \left (c x^{2} - b x - a\right )^{3} + 6 \, {\left (2 \, c^{2} x + b c\right )} \sinh \left (c x^{2} - b x - a\right )^{4} - 3 \, \sqrt {2} \sqrt {\pi } {\left ({\left (b^{2} - c\right )} \cosh \left (c x^{2} - b x - a\right )^{2} \cosh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) - {\left (b^{2} - c\right )} \cosh \left (c x^{2} - b x - a\right )^{2} \sinh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) + {\left ({\left (b^{2} - c\right )} \cosh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) - {\left (b^{2} - c\right )} \sinh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right )\right )} \sinh \left (c x^{2} - b x - a\right )^{2} + 2 \, {\left ({\left (b^{2} - c\right )} \cosh \left (c x^{2} - b x - a\right ) \cosh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) - {\left (b^{2} - c\right )} \cosh \left (c x^{2} - b x - a\right ) \sinh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right )\right )} \sinh \left (c x^{2} - b x - a\right )\right )} \sqrt {-c} \operatorname {erf}\left (\frac {\sqrt {2} {\left (2 \, c x - b\right )} \sqrt {-c}}{2 \, c}\right ) + 3 \, \sqrt {2} \sqrt {\pi } {\left ({\left (b^{2} + c\right )} \cosh \left (c x^{2} - b x - a\right )^{2} \cosh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) + {\left (b^{2} + c\right )} \cosh \left (c x^{2} - b x - a\right )^{2} \sinh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) + {\left ({\left (b^{2} + c\right )} \cosh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) + {\left (b^{2} + c\right )} \sinh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right )\right )} \sinh \left (c x^{2} - b x - a\right )^{2} + 2 \, {\left ({\left (b^{2} + c\right )} \cosh \left (c x^{2} - b x - a\right ) \cosh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right ) + {\left (b^{2} + c\right )} \cosh \left (c x^{2} - b x - a\right ) \sinh \left (\frac {b^{2} + 4 \, a c}{2 \, c}\right )\right )} \sinh \left (c x^{2} - b x - a\right )\right )} \sqrt {c} \operatorname {erf}\left (\frac {\sqrt {2} {\left (2 \, c x - b\right )}}{2 \, \sqrt {c}}\right ) - 12 \, c^{2} x + 4 \, {\left (8 \, c^{3} x^{3} + 9 \, {\left (2 \, c^{2} x + b c\right )} \cosh \left (c x^{2} - b x - a\right )^{2}\right )} \sinh \left (c x^{2} - b x - a\right )^{2} - 6 \, b c + 8 \, {\left (8 \, c^{3} x^{3} \cosh \left (c x^{2} - b x - a\right ) + 3 \, {\left (2 \, c^{2} x + b c\right )} \cosh \left (c x^{2} - b x - a\right )^{3}\right )} \sinh \left (c x^{2} - b x - a\right )}{192 \, {\left (c^{3} \cosh \left (c x^{2} - b x - a\right )^{2} + 2 \, c^{3} \cosh \left (c x^{2} - b x - a\right ) \sinh \left (c x^{2} - b x - a\right ) + c^{3} \sinh \left (c x^{2} - b x - a\right )^{2}\right )}} \]

[In]

integrate(x^2*cosh(-c*x^2+b*x+a)^2,x, algorithm="fricas")

[Out]

1/192*(32*c^3*x^3*cosh(c*x^2 - b*x - a)^2 + 6*(2*c^2*x + b*c)*cosh(c*x^2 - b*x - a)^4 + 24*(2*c^2*x + b*c)*cos
h(c*x^2 - b*x - a)*sinh(c*x^2 - b*x - a)^3 + 6*(2*c^2*x + b*c)*sinh(c*x^2 - b*x - a)^4 - 3*sqrt(2)*sqrt(pi)*((
b^2 - c)*cosh(c*x^2 - b*x - a)^2*cosh(1/2*(b^2 + 4*a*c)/c) - (b^2 - c)*cosh(c*x^2 - b*x - a)^2*sinh(1/2*(b^2 +
 4*a*c)/c) + ((b^2 - c)*cosh(1/2*(b^2 + 4*a*c)/c) - (b^2 - c)*sinh(1/2*(b^2 + 4*a*c)/c))*sinh(c*x^2 - b*x - a)
^2 + 2*((b^2 - c)*cosh(c*x^2 - b*x - a)*cosh(1/2*(b^2 + 4*a*c)/c) - (b^2 - c)*cosh(c*x^2 - b*x - a)*sinh(1/2*(
b^2 + 4*a*c)/c))*sinh(c*x^2 - b*x - a))*sqrt(-c)*erf(1/2*sqrt(2)*(2*c*x - b)*sqrt(-c)/c) + 3*sqrt(2)*sqrt(pi)*
((b^2 + c)*cosh(c*x^2 - b*x - a)^2*cosh(1/2*(b^2 + 4*a*c)/c) + (b^2 + c)*cosh(c*x^2 - b*x - a)^2*sinh(1/2*(b^2
 + 4*a*c)/c) + ((b^2 + c)*cosh(1/2*(b^2 + 4*a*c)/c) + (b^2 + c)*sinh(1/2*(b^2 + 4*a*c)/c))*sinh(c*x^2 - b*x -
a)^2 + 2*((b^2 + c)*cosh(c*x^2 - b*x - a)*cosh(1/2*(b^2 + 4*a*c)/c) + (b^2 + c)*cosh(c*x^2 - b*x - a)*sinh(1/2
*(b^2 + 4*a*c)/c))*sinh(c*x^2 - b*x - a))*sqrt(c)*erf(1/2*sqrt(2)*(2*c*x - b)/sqrt(c)) - 12*c^2*x + 4*(8*c^3*x
^3 + 9*(2*c^2*x + b*c)*cosh(c*x^2 - b*x - a)^2)*sinh(c*x^2 - b*x - a)^2 - 6*b*c + 8*(8*c^3*x^3*cosh(c*x^2 - b*
x - a) + 3*(2*c^2*x + b*c)*cosh(c*x^2 - b*x - a)^3)*sinh(c*x^2 - b*x - a))/(c^3*cosh(c*x^2 - b*x - a)^2 + 2*c^
3*cosh(c*x^2 - b*x - a)*sinh(c*x^2 - b*x - a) + c^3*sinh(c*x^2 - b*x - a)^2)

Sympy [F]

\[ \int x^2 \cosh ^2\left (a+b x-c x^2\right ) \, dx=\int x^{2} \cosh ^{2}{\left (a + b x - c x^{2} \right )}\, dx \]

[In]

integrate(x**2*cosh(-c*x**2+b*x+a)**2,x)

[Out]

Integral(x**2*cosh(a + b*x - c*x**2)**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 322, normalized size of antiderivative = 1.20 \[ \int x^2 \cosh ^2\left (a+b x-c x^2\right ) \, dx=\frac {1}{6} \, x^{3} - \frac {\sqrt {2} {\left (\frac {\sqrt {\pi } {\left (2 \, c x - b\right )} b^{2} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {\frac {{\left (2 \, c x - b\right )}^{2}}{c}}\right ) - 1\right )}}{\sqrt {\frac {{\left (2 \, c x - b\right )}^{2}}{c}} \left (-c\right )^{\frac {5}{2}}} - \frac {2 \, \sqrt {2} b c e^{\left (-\frac {{\left (2 \, c x - b\right )}^{2}}{2 \, c}\right )}}{\left (-c\right )^{\frac {5}{2}}} - \frac {2 \, {\left (2 \, c x - b\right )}^{3} \Gamma \left (\frac {3}{2}, \frac {{\left (2 \, c x - b\right )}^{2}}{2 \, c}\right )}{\left (\frac {{\left (2 \, c x - b\right )}^{2}}{c}\right )^{\frac {3}{2}} \left (-c\right )^{\frac {5}{2}}}\right )} e^{\left (2 \, a + \frac {b^{2}}{2 \, c}\right )}}{64 \, \sqrt {-c}} + \frac {\sqrt {2} {\left (\frac {\sqrt {\pi } {\left (2 \, c x - b\right )} b^{2} {\left (\operatorname {erf}\left (\sqrt {\frac {1}{2}} \sqrt {-\frac {{\left (2 \, c x - b\right )}^{2}}{c}}\right ) - 1\right )}}{\sqrt {-\frac {{\left (2 \, c x - b\right )}^{2}}{c}} c^{\frac {5}{2}}} + \frac {2 \, \sqrt {2} b e^{\left (\frac {{\left (2 \, c x - b\right )}^{2}}{2 \, c}\right )}}{c^{\frac {3}{2}}} - \frac {2 \, {\left (2 \, c x - b\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {{\left (2 \, c x - b\right )}^{2}}{2 \, c}\right )}{\left (-\frac {{\left (2 \, c x - b\right )}^{2}}{c}\right )^{\frac {3}{2}} c^{\frac {5}{2}}}\right )} e^{\left (-2 \, a - \frac {b^{2}}{2 \, c}\right )}}{64 \, \sqrt {c}} \]

[In]

integrate(x^2*cosh(-c*x^2+b*x+a)^2,x, algorithm="maxima")

[Out]

1/6*x^3 - 1/64*sqrt(2)*(sqrt(pi)*(2*c*x - b)*b^2*(erf(sqrt(1/2)*sqrt((2*c*x - b)^2/c)) - 1)/(sqrt((2*c*x - b)^
2/c)*(-c)^(5/2)) - 2*sqrt(2)*b*c*e^(-1/2*(2*c*x - b)^2/c)/(-c)^(5/2) - 2*(2*c*x - b)^3*gamma(3/2, 1/2*(2*c*x -
 b)^2/c)/(((2*c*x - b)^2/c)^(3/2)*(-c)^(5/2)))*e^(2*a + 1/2*b^2/c)/sqrt(-c) + 1/64*sqrt(2)*(sqrt(pi)*(2*c*x -
b)*b^2*(erf(sqrt(1/2)*sqrt(-(2*c*x - b)^2/c)) - 1)/(sqrt(-(2*c*x - b)^2/c)*c^(5/2)) + 2*sqrt(2)*b*e^(1/2*(2*c*
x - b)^2/c)/c^(3/2) - 2*(2*c*x - b)^3*gamma(3/2, -1/2*(2*c*x - b)^2/c)/((-(2*c*x - b)^2/c)^(3/2)*c^(5/2)))*e^(
-2*a - 1/2*b^2/c)/sqrt(c)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 186, normalized size of antiderivative = 0.69 \[ \int x^2 \cosh ^2\left (a+b x-c x^2\right ) \, dx=\frac {1}{6} \, x^{3} - \frac {\frac {\sqrt {2} \sqrt {\pi } {\left (b^{2} + c\right )} \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {2} \sqrt {c} {\left (2 \, x - \frac {b}{c}\right )}\right ) e^{\left (\frac {b^{2} + 4 \, a c}{2 \, c}\right )}}{\sqrt {c}} + 2 \, {\left (c {\left (2 \, x - \frac {b}{c}\right )} + 2 \, b\right )} e^{\left (-2 \, c x^{2} + 2 \, b x + 2 \, a\right )}}{64 \, c^{2}} - \frac {\frac {\sqrt {2} \sqrt {\pi } {\left (b^{2} - c\right )} \operatorname {erf}\left (-\frac {1}{2} \, \sqrt {2} \sqrt {-c} {\left (2 \, x - \frac {b}{c}\right )}\right ) e^{\left (-\frac {b^{2} + 4 \, a c}{2 \, c}\right )}}{\sqrt {-c}} - 2 \, {\left (c {\left (2 \, x - \frac {b}{c}\right )} + 2 \, b\right )} e^{\left (2 \, c x^{2} - 2 \, b x - 2 \, a\right )}}{64 \, c^{2}} \]

[In]

integrate(x^2*cosh(-c*x^2+b*x+a)^2,x, algorithm="giac")

[Out]

1/6*x^3 - 1/64*(sqrt(2)*sqrt(pi)*(b^2 + c)*erf(-1/2*sqrt(2)*sqrt(c)*(2*x - b/c))*e^(1/2*(b^2 + 4*a*c)/c)/sqrt(
c) + 2*(c*(2*x - b/c) + 2*b)*e^(-2*c*x^2 + 2*b*x + 2*a))/c^2 - 1/64*(sqrt(2)*sqrt(pi)*(b^2 - c)*erf(-1/2*sqrt(
2)*sqrt(-c)*(2*x - b/c))*e^(-1/2*(b^2 + 4*a*c)/c)/sqrt(-c) - 2*(c*(2*x - b/c) + 2*b)*e^(2*c*x^2 - 2*b*x - 2*a)
)/c^2

Mupad [F(-1)]

Timed out. \[ \int x^2 \cosh ^2\left (a+b x-c x^2\right ) \, dx=\int x^2\,{\mathrm {cosh}\left (-c\,x^2+b\,x+a\right )}^2 \,d x \]

[In]

int(x^2*cosh(a + b*x - c*x^2)^2,x)

[Out]

int(x^2*cosh(a + b*x - c*x^2)^2, x)